home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / pgm_util / regmax / regform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-01-03  |  6.6 KB  |  211 lines

  1. VERSION 2.00
  2. Begin Form REGFORM 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Registration Form"
  6.    ClientHeight    =   2490
  7.    ClientLeft      =   2580
  8.    ClientTop       =   4050
  9.    ClientWidth     =   6780
  10.    FontBold        =   0   'False
  11.    FontItalic      =   0   'False
  12.    FontName        =   "MS Sans Serif"
  13.    FontSize        =   8.25
  14.    FontStrikethru  =   0   'False
  15.    FontUnderline   =   0   'False
  16.    Height          =   2895
  17.    Icon            =   REGFORM.FRX:0000
  18.    Left            =   2520
  19.    LinkTopic       =   "Form1"
  20.    MaxButton       =   0   'False
  21.    MinButton       =   0   'False
  22.    ScaleHeight     =   2490
  23.    ScaleWidth      =   6780
  24.    Top             =   3705
  25.    Width           =   6900
  26.    Begin TextBox txt_USERORG 
  27.       FontBold        =   -1  'True
  28.       FontItalic      =   0   'False
  29.       FontName        =   "Arial"
  30.       FontSize        =   9.75
  31.       FontStrikethru  =   0   'False
  32.       FontUnderline   =   0   'False
  33.       Height          =   360
  34.       Left            =   1140
  35.       TabIndex        =   2
  36.       TabStop         =   0   'False
  37.       Text            =   "Text1"
  38.       Top             =   1980
  39.       Width           =   3975
  40.    End
  41.    Begin TextBox txt_USERNAME 
  42.       FontBold        =   -1  'True
  43.       FontItalic      =   0   'False
  44.       FontName        =   "Arial"
  45.       FontSize        =   9.75
  46.       FontStrikethru  =   0   'False
  47.       FontUnderline   =   0   'False
  48.       Height          =   360
  49.       Left            =   1140
  50.       TabIndex        =   0
  51.       TabStop         =   0   'False
  52.       Text            =   "Text1"
  53.       Top             =   1500
  54.       Width           =   3975
  55.    End
  56.    Begin CommandButton btn_Cancel 
  57.       Cancel          =   -1  'True
  58.       Caption         =   "&Cancel"
  59.       Height          =   495
  60.       Left            =   5340
  61.       TabIndex        =   3
  62.       TabStop         =   0   'False
  63.       Top             =   840
  64.       Width           =   1215
  65.    End
  66.    Begin CommandButton btn_OK 
  67.       Caption         =   "&OK"
  68.       Height          =   495
  69.       Left            =   5340
  70.       TabIndex        =   1
  71.       TabStop         =   0   'False
  72.       Top             =   180
  73.       Width           =   1215
  74.    End
  75.    Begin Label Label1 
  76.       Alignment       =   1  'Right Justify
  77.       BackStyle       =   0  'Transparent
  78.       Caption         =   "Organisation:"
  79.       FontBold        =   0   'False
  80.       FontItalic      =   0   'False
  81.       FontName        =   "Arial"
  82.       FontSize        =   8.25
  83.       FontStrikethru  =   0   'False
  84.       FontUnderline   =   0   'False
  85.       Height          =   255
  86.       Left            =   60
  87.       TabIndex        =   6
  88.       Top             =   2040
  89.       Width           =   1035
  90.    End
  91.    Begin Label lbl_Name 
  92.       Alignment       =   1  'Right Justify
  93.       BackStyle       =   0  'Transparent
  94.       Caption         =   "Your Name:"
  95.       FontBold        =   0   'False
  96.       FontItalic      =   0   'False
  97.       FontName        =   "Arial"
  98.       FontSize        =   8.25
  99.       FontStrikethru  =   0   'False
  100.       FontUnderline   =   0   'False
  101.       Height          =   255
  102.       Left            =   60
  103.       TabIndex        =   5
  104.       Top             =   1560
  105.       Width           =   1035
  106.    End
  107.    Begin Label lbl_Title1 
  108.       Alignment       =   2  'Center
  109.       BackStyle       =   0  'Transparent
  110.       FontBold        =   -1  'True
  111.       FontItalic      =   0   'False
  112.       FontName        =   "Arial"
  113.       FontSize        =   10.5
  114.       FontStrikethru  =   0   'False
  115.       FontUnderline   =   0   'False
  116.       Height          =   1155
  117.       Left            =   180
  118.       TabIndex        =   4
  119.       Top             =   180
  120.       Width           =   4935
  121.    End
  122.    Begin Image img_Icon 
  123.       BorderStyle     =   1  'Fixed Single
  124.       Height          =   510
  125.       Left            =   5700
  126.       Picture         =   REGFORM.FRX:0302
  127.       Top             =   1620
  128.       Width           =   510
  129.    End
  130. Option Explicit
  131. '   //General variable//
  132. Dim msg As String
  133. Sub btn_Cancel_Click ()
  134. '   /* Modified 31/12/94 [GB] */
  135. '   /* Created 31/12/94 [GB] */
  136. USERNAME = "UNLICENSED"
  137. USERORG = "UNLICENSED"
  138. Unload Me
  139. End Sub
  140. Sub btn_OK_Click ()
  141. '   /* Modified 31/12/94 [GB] */
  142. '   /* Created 31/12/94 [GB] */
  143. USERNAME = txt_USERNAME.Text
  144. USERORG = txt_USERORG.Text
  145. Dim sz_Key As String
  146. '   //Only register on valid input//
  147. If USERNAME = "" Or USERORG = "" Then
  148.     USERNAME = "Gordon Bamber"
  149.     USERORG = "Maxim Training"
  150. End If
  151. If ISVBRUNNING() = 0 Then
  152.     sz_Key = InputBox$("Please enter your unique registration code", "REGMAX Registration", "1234567890")
  153.     PutDataIntoEXE USERNAME, USERORG, sz_Key
  154.     '   //Allow once-Only registration//
  155.     '   //NOTE: this is not required.//
  156.     '   //Multiple writes to the EXE are OK//
  157.     MainForm!btn_WriteRegData.Enabled = False
  158. End If
  159. Unload Me
  160. End Sub
  161. Sub Form_Load ()
  162. '   /* Modified 31/12/94 [GB] */
  163. '   /* Created 31/12/94 [GB] */
  164. '   //Place the form correctly on the screen//
  165. Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
  166. '   //Initialise this form display//
  167. InitFrmVars
  168. '   //Form must be visible for SetFocus to work//
  169. txt_USERNAME.SelStart = 0
  170. txt_USERNAME.SelLength = Len(txt_USERNAME.Text)
  171. txt_USERNAME.SetFocus
  172. End Sub
  173. Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
  174. '   /* Modified 31/12/94 [GB] */
  175. '   /* Created 31/12/94 [GB] */
  176. MainForm.Show
  177. End Sub
  178. Sub InitFrmVars ()
  179. '   /* Modified 31/12/94 [GB] */
  180. '   /* Created 31/12/94 [GB] */
  181. msg = "Thank you for purchasing this software.  "
  182. msg = msg & "In order to complete the registration details, please type in the following information,"
  183. msg = msg & " and then select OK."
  184. lbl_Title1.Caption = msg
  185. '   //Initialise for Text Boxes//
  186. USERNAME = "Gordon Bamber"
  187. USERORG = "Maxim Training"
  188. txt_USERNAME.Text = USERNAME
  189. txt_USERORG.Text = USERORG
  190. End Sub
  191. Sub txt_USERNAME_KeyDown (KeyCode As Integer, Shift As Integer)
  192. '   /* Modified 31/12/94 [GB] */
  193. '   /* Created 31/12/94 [GB] */
  194. If KeyCode = 13 Or KeyCode = 9 Then
  195.     KeyCode = 0
  196.     USERNAME = txt_USERNAME.Text
  197.     txt_USERORG.SelStart = 0
  198.     txt_USERORG.SelLength = Len(txt_USERORG.Text)
  199.     txt_USERORG.SetFocus
  200. End If
  201. End Sub
  202. Sub txt_USERORG_KeyDown (KeyCode As Integer, Shift As Integer)
  203. '   /* Modified 31/12/94 [GB] */
  204. '   /* Created 31/12/94 [GB] */
  205. If KeyCode = 13 Or KeyCode = 9 Then
  206.     KeyCode = 0
  207.     USERORG = txt_USERORG.Text
  208.     Btn_OK.SetFocus
  209. End If
  210. End Sub
  211.